package me.search;

public class A01_BasicSearchDemo1 {
    public static void main(String[] args) {
        //定义一个方法，基本查找
        int[] arr = {11, 12, 13, 14, 15, 16};
        int number = 12;
        System.out.println(basicSearch(arr, number));
    }

    public static boolean basicSearch(int[] arr, int number) {
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] == number) {
                return true;
            }
        }
        return false;
    }
}
